<template>
  <div>
    <el-card>
      <h2 style="text-align: center">实验室运行记录</h2>
      <el-table
        border
        stripe
        :cell-style="{ 'text-align': 'center' }"
        :header-cell-style="{
          'text-align': 'center',
          background: '#E4E7ED',
          color: '#606266',
        }"
        :data="RunningForm"
        style="margin-bottom: 30px"
      >
        <el-table-column label="#" type="index"></el-table-column>
        <el-table-column label="周次" prop="week"></el-table-column>
        <el-table-column label="时间" prop="time"></el-table-column>
        <el-table-column
          label="专业班级（综合班）"
          prop="class_id"
        ></el-table-column>
        <!-- <el-table-column label="学生姓名" prop="sname"></el-table-column> -->
        <el-table-column label="人数" prop="number"></el-table-column>
        <el-table-column
          label="课程名称/实验项目"
          prop="class_name"
        ></el-table-column>
        <el-table-column label="课程类型" prop="class_type"></el-table-column>
        <el-table-column label="任课教师" prop="teacher"></el-table-column>
        <el-table-column
          label="设备运行情况"
          prop="situation"
        ></el-table-column>
        <el-table-column label="备注" prop="remark"></el-table-column>
      </el-table>
      <span style="margin-top: 5px">
        谪写说明: 1.周次:本学期第几周; 2.时间:日期和具体时间;
        3.专业班级:实验室课谪专业班或综合班名称,开放实验填学生本专业名称;
        4.学生姓名:实验课不填; 5.人数:实验课填具体人数,开放实验不填;
        6.课程名称∶实验课填课程名称和实验项目，开放实验只填实验项目名称;
        7.课程类型:“必修、选修、开放”;
        8.设备运行情况:(正常、报修，报修电话:64888041); 9.备注;
      </span>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      RunningForm: [],
    };
  },
  created() {
    this.getList();
  },
  methods: {
    async getList() {
      const { data: res } = await this.$http.post("/api/student/selectlabrun", {
        form_id: sessionStorage.getItem("Running"),
      });
      if (res.code !== 200) {
        return this.$message.error("获取实验室运行记录失败！");
      }
      this.$message.success("成功获取实验室运行记录！");
      this.RunningForm = res.data;
    },
  },
};
</script>
<style scoped>
.el-card {
  width: 60%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
</style>